import Vue from 'vue'
import VueI18n from 'vue-i18n' // 引入国际化的包
Vue.use(VueI18n)
import enLocale from 'element-ui/lib/locale/lang/en'
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'

import customZH from './zh'
import customEN from './en'
export default new VueI18n({
  locale: localStorage.getItem('lang') || 'zh',
  messages: {
    zh: {
      morning: '早安',
      goodDay: '祝你开心每一天',
      ...zhLocale,
      ...customZH
    },
    en: {
      morning: 'Good Morning',
      goodDay: 'happy day!',
      ...enLocale,
      ...customEN
    }
  }
})
